package com.soft.admin.serviceimpl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;

import com.soft.admin.service.IAdminMenuService;
import com.soft.dao.GenericDao;
import com.soft.mapping.AdminMenu;

public class AdminMenuServiceImpl extends GenericDao<AdminMenu> implements IAdminMenuService {

	@SuppressWarnings("unchecked")
	@Override
	public List<AdminMenu> getAdminMenuList() {
		Criteria cr = this.getSession().createCriteria(this.getPojoClass());
		cr.add(Restrictions.eq("delflag", (short) 0));
		cr.add(Restrictions.isNull("adminMenu"));
		cr.addOrder(Order.asc("sort"));
		return cr.list();
	}

}
